//
//  BaseViewController.h
//  coachxx
//
//  Created by 檀建军 on 15/12/23.
//  Copyright © 2015年 arenacloud. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"

typedef void (^VOIDBlock)();

typedef NS_ENUM(NSInteger, HTNavBarType)
{
    HTNavBarType_NoButton,
    HTNavBarType_Text,
    HTNavBarType_Back,
    HTNavBarType_Cart,
    HTNavBarType_AddFriend,
    HTNavBarType_Search,
    HTNavBarType_More,
    HTNavBarType_Camera,
    HTNavBarType_Share
};

typedef NS_ENUM(NSInteger, HTNavBarLocation)
{
    HTNavBarLocation_Left,
    HTNavBarLocation_Right,
};

@interface BaseViewController : UIViewController
{
    MBProgressHUD* _tipsView;
}

@property (nonatomic, assign) HTNavBarType leftNavType;
@property (nonatomic, assign) HTNavBarType rightNavType;
@property (nonatomic, assign) SEL leftNaviBarButtonSelector;
@property (nonatomic, assign) SEL rightNaviBarButtonSelector;
@property (nonatomic, strong) NSString *rightButtonText;
@property (nonatomic, assign) BOOL disableRightButton;

// 导航栏按钮事件 (可重写，默认调用基类)
- (void)tapLeftView;
- (void)tapRightView;

- (void)hideRightView;
- (void)showRihghtView;

- (void)toastTitle:(NSString*)title message:(NSString*)message;
- (void)toastTitle:(NSString*)title message:(NSString*)message action:(void(^)())block;
- (void)showHtToastWithTitle:(NSString *)title message:(NSString *)message custompositonForTop:(CGFloat)positionY;
- (void)showHtToastWithTitle:(NSString *)title message:(NSString *)message positon:(id)position;

// alert提示框
- (void)alertTitle:(NSString *)title message:(NSString *)message;
- (void)alertTitle:(NSString*)title message:(NSString*)message ok:(BOOL)ok okAction:(void(^)(void))okAction cancel:(BOOL)cancel cancelAction:(void(^)(void))cancelAction;

- (void)canceFirstResponder;

-(void)startLoadingAnimation;
-(void)stopLoadingAnimation;




@end
